package com.tang.model.jdk;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/9/6 20:35
 * @Desc
 * @Remarks
 */
public class Test {

    public static void main(String[] args) {
        ZhihuStandard zhihu = ZhihuStandard.getInstance();
        zhihu.addObserver(new Teacher("tom"));
        zhihu.addObserver(new Teacher("jerry"));

        Question question = new Question();
        question.setName("张三");
        question.setContent("花儿为什么那么红？");
        zhihu.publishQuestion(question);

    }
}
